from django.db import models

# Create your models here.

class Publisher(models.Model):

    name = models.CharField(max_length=100)
    address=models.CharField(max_length=100)



class Book(models.Model):
    name = models.CharField(max_length=100)
    publisher=models.ForeignKey(Publisher,on_delete=models.CASCADE,related_name='books')
    book_status=models.IntegerField(default=0)
    reader=models.CharField(max_length=100)
    updatetime=models.DateTimeField(auto_now_add=True)